<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%--<x:parse xml="${param.xmlstr}" var="xmlData" />--%>
<div class="t_bar">
    <span class="color_red">*</span>基地负责人
    <security:authorize ifNotGranted="A_DAILU_PROPOSAL">
        <!-- <span style="font-size: 12px;font-weight: normal;">
        （如果您需要修改申请人信息， 请保存申请书后点击菜单“管理”>“个人信息维护”完成修改）
        </span> -->
    </security:authorize>
</div>
<table  id="zh_persons" width="100%" border="0" cellspacing="1" cellpadding="0" class="table01 t_css" >
    <thead>
    <tr>
       <%-- <th width="5%">选择</th>
        <th width="5%">序号</th>--%>
        <th width="7%">姓名</th>
        <th width="5%">性别</th>
        <th width="8%">出生年月</th>
        <th width="12%">派出单位</th>
        <th width="8%">职务/职称</th>
        <th width="10%">身份证号码</th>
        <th width="5%">学位</th>
        <th width="8%">所学专业</th>
        <th width="7%">从事专业</th>
        <th width="10%">联系电话</th>
        <th width="10%">手机</th>
        <th width="10%">E-mail</th>

        <%--<th width="11%">学历</th>
        <th width="12%">项目分工</th>--%>
    </tr>
    </thead>
    <tbody id="tab">
    <c:set value="0" var="index" scope="page" />
    <x:forEach select="$xmlData/data/zh_persons/zh_person" var="zh_person" begin="0" end="0">
        <c:choose>
            <c:when test="${index<10}">
                <c:set value="0" var="flag" scope="page" />
            </c:when>
            <c:otherwise>
                <c:set value="" var="flag" scope="page" />
            </c:otherwise>
        </c:choose>
        <tr>
            <%--<td  align="center"  width="50px" >
                <input type="radio" name="sel_zh_persons" onclick="setSubmitPsn()" />

            </td>--%>
           <%-- <td align="center">
                <span style="hidde" name="zh_persons/zh_person[${flag}${index}]@seq_no">${index+1}</span>
            </td>--%>
            <td align="center">
                <c:if test="${index==0}">
                    <input type="hidden" id="submit_psn" name="zh_persons/zh_person[${flag}${index}]@submit_psn" value="1" />
                    <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/psn_code" value="<x:out select="$zh_person/basic_info/psn_code" />"/>
                </c:if>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/en_name" value="<x:out select="$zh_person/basic_info/en_name" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/ethnicity_value" value="<x:out select="$zh_person/basic_info/ethnicity_value" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/ethnicity_name" value="<x:out select="$zh_person/basic_info/ethnicity_name" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/subject_code" value="<x:out select="$zh_person/basic_info/subject_code" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/subject_name" value="<x:out select="$zh_person/basic_info/subject_name" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/discipline_code" value="<x:out select="$zh_person/basic_info/discipline_code" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/discipline_name" value="<x:out select="$zh_person/basic_info/discipline_name" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/region_value" value="<x:out select="$zh_person/basic_info/region_value" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/region_name" value="<x:out select="$zh_person/basic_info/region_name" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/card_type_value" value="<x:out select="$zh_person/basic_info/card_type_value" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/academician_value" value="<x:out select="$zh_person/basic_info/academician_value" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/academician_name" value="<x:out select="$zh_person/basic_info/academician_name" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/org_code" value="<x:out select="$zh_person/basic_info/org_code" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/contact/tel_work" value="<x:out select="$zh_person/contact/tel_work" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/contact/fax" value="<x:out select="$zh_person/contact/fax" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_value" value="<x:out select="$zh_person/basic_info/degree_value" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_name" value="<x:out select="$zh_person/basic_info/degree_name" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/post_code" value="<x:out select="$zh_person/basic_info/post_code" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_country_value" value="<x:out select="$zh_person/basic_info/degree_country_value" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_country_name" value="<x:out select="$zh_person/basic_info/degree_country_name" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_college" value="<x:out select="$zh_person/basic_info/degree_college" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_year" value="<x:out select="$zh_person/basic_info/degree_year" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/position" value="<x:out select="$zh_person/basic_info/position" />" />

                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/gender" value="<x:out select="$zh_person/basic_info/gender" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/gender_value" value="<x:out select="$zh_person/basic_info/gender_value" />" />

                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/prof_title" value="<x:out select="$zh_person/basic_info/prof_title" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/prof_title_value" value="<x:out select="$zh_person/basic_info/prof_title_value" />" />
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/address" value="<x:out select="$zh_person/basic_info/address" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/post_doctor_value" value="<x:out select="$zh_person/basic_info/post_doctor_value" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/post_doctor_name" value="<x:out select="$zh_person/basic_info/post_doctor_name" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/age" value="<x:out select="$zh_person/basic_info/age" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/educate_value" value="<x:out select="$zh_person/basic_info/educate_value" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/card_code" value="<x:out select="$zh_person/basic_info/card_code" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/basic_info/card_type_name" value="<x:out select="$zh_person/basic_info/card_type_name" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/contact/email" value="<x:out select="$zh_person/contact/email" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/contact/mobile" value="<x:out select="$zh_person/contact/mobile" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/contact/major" value="<x:out select="$zh_person/contact/major" />"/>
                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/iscomember" value="0"/>

                <input type="hidden" name="zh_persons/zh_person[${flag}${index}]/researches" label="xml"/>
                <input type="hidden"  name="zh_persons/zh_person[${flag}${index}]@seq_no" value="${index+1}">
                <span name="zh_persons/zh_person[${flag}${index}]/basic_info/zh_name"><x:out select="$zh_person/basic_info/zh_name" /></span>
                <security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
                    <c:if test="${index==0 }"><a href="###" class="Blue" style="text-decoration: none;" onclick="selectFirstRadio(this);editRow('zh_persons','${ctx}/proposal/edit/dialog/psnInfoEdit_dwkjhz2021st?parentTab=zh_persons&type=edit&needMeetingInfo=${param.needMeetingInfo}&psnCode=<x:out select="$zh_person/basic_info/psn_code" />&TB_iframe=true&height=440&width=900','编辑项目参与人信息')">[&nbsp;设置&nbsp;]</a></c:if>
                </security:authorize>
            </td>

            <td align="center">
                <c:set var="gender_value"><x:out select="$zh_person/basic_info/gender_value" /></c:set>
                <c:choose>
                    <c:when test="${gender_value == 'F' || gender_value == 'M'}">
                        <c:if test="${gender_value == 'F'}"><span name="zh_persons/zh_person[${flag}${index}]/basic_info/gender_name">女</span></c:if>
                        <c:if test="${gender_value == 'M'}"><span name="zh_persons/zh_person[${flag}${index}]/basic_info/gender_name">男</span></c:if>
                    </c:when>
                    <%-- <c:otherwise>
                         <span name="zh_persons/zh_person[${flag}${index}]/basic_info/gender_name"><x:out select="$zh_person/basic_info/gender_name" /></span>
                     </c:otherwise> --%>
                </c:choose>
            </td>

            <td align="center">
                <span name="zh_persons/zh_person[${flag}${index}]/basic_info/birthday"><x:out select="$zh_person/basic_info/birthday" /></span>
            </td>
                <%-- <span name="zh_persons/zh_person[${flag}${index}]/basic_info/gender_name"><x:out select="$zh_person/basic_info/gender_name" /></span> --%>

            <td align="left">
                <span name="zh_persons/zh_person[${flag}${index}]/basic_info/org_name"><x:out select="$zh_person/basic_info/org_name" /></span>
            </td>

            <td align="center">
                <span name="zh_persons/zh_person[${flag}${index}]/basic_info/position"><x:out select="$zh_person/basic_info/position" /></span>/
                <span name="zh_persons/zh_person[${flag}${index}]/basic_info/prof_title_name"><x:out select="$zh_person/basic_info/prof_title_name" /></span>
            </td>

            <td align="center">
                <span name="zh_persons/zh_person[${flag}${index}]/basic_info/card_code"><x:out select="$zh_person/basic_info/card_code" /></span>
            </td>

            <td align="center">
                <span name="zh_persons/zh_person[${flag}${index}]/basic_info/degree_name"><x:out select="$zh_person/basic_info/degree_name" /></span>
            </td>

            <td align="left">
                <span name="zh_persons/zh_person[${flag}${index}]/contact/major" id="major[${flag}${index}]"><x:out select="$zh_person/contact/major" /></span>
            </td>

            <td align="left">
                <span name="zh_persons/zh_person[${flag}${index}]/contact/major_work"><x:out select="$zh_person/contact/major_work" /></span>
            </td>

            <td align="left">
                <span name="zh_persons/zh_person[${flag}${index}]/contact/tel_work" id="major[${flag}${index}]"><x:out select="$zh_person/contact/tel_work" /></span>
            </td>

            <td align="left">
                <span name="zh_persons/zh_person[${flag}${index}]/contact/mobile" id="major[${flag}${index}]"><x:out select="$zh_person/contact/mobile" /></span>
            </td>

            <td align="left">
                <span name="zh_persons/zh_person[${flag}${index}]/contact/email" id="major[${flag}${index}]"><x:out select="$zh_person/contact/email" /></span>
            </td>

            <%--<td align="center">
                <span name="zh_persons/zh_person[${flag}${index}]/basic_info/educate_name"><x:out select="$zh_person/basic_info/educate_name" /></span>
            </td>

            <td align="left">
                <span name="zh_persons/zh_person[${flag}${index}]/basic_info/work"><c:choose><c:when test="${index==0}">项目负责人</c:when><c:otherwise><x:out select="$zh_person/basic_info/work" /></c:otherwise></c:choose></span>
            </td>--%>
        </tr>

        <c:set var="zh_person" value=""></c:set>

        <c:set value="${index+1}" var="index" scope="page" />
    </x:forEach>
    </tbody>
</table>


<%--<table border="0" cellpadding="0" cellspacing="1">
    <tr>
        <td>
            <input class="button_02" type="button" value="添加" onclick="if(checkTabLimit('zh_persons',1,'项目组主要参与人员最多只能填写1条')){addNewRow('zh_persons','${ctx}/proposal/edit/dialog/psnInfoEdit_zdkjcggchyfxm_2021st?parentTab=zh_persons&type=add&needMeetingInfo=${param.needMeetingInfo}&TB_iframe=true&height=440&width=900','添加项目组主要参与人员');}try{top.resizeFrame();}catch(e){};">
            &nbsp;<input class="button_02"  id="zh_psnPrev" type="button" value="上移" onclick="movePrev('zh_persons');setSubmitPsn()">
            &nbsp;<input class="button_02"  id="zh_psnNext" type="button" value="下移" onclick="moveNext('zh_persons');setSubmitPsn()">
            &nbsp;<input class="button_02"  id="zh_psnEdit" type="button" value="编辑" onclick="if(checkSubmitPsn('zh_persons'))editRow('zh_persons','${ctx}/proposal/edit/dialog/psnInfoEdit_zdkjcggchyfxm_2021st?parentTab=zh_persons&type=edit&needMeetingInfo=${param.needMeetingInfo}&TB_iframe=true&height=440&width=900','编辑项目组主要参与人员')">
            &nbsp;<input class="button_02"  id="zh_psnDel" type="button" value="删除" onclick="deleteSelectedRow('zh_persons','项目组主要参与人员',1,'申请人不能被删除');"></td>
    </tr>
    </tbody>
    <tfoot>
    </tfoot>
</table>--%>

<table class="t_css" width="100%" border="0" cellpadding="0"  id="tblxianxiren"  cellspacing="1">
    <%--<col style="width: 20%"/>
    <col style="width: 20%"/>
    <col style="width: 20%"/>
    <col style="width: 20%"/>
    <col style="width: 20%"/>--%>

    <tr class="li_1">
        <td align="center" rowspan="2" width="96px">联系人</td>
        <td align="right" width="165px">姓名：</td>
        <td width="265px">
            <input   name="proposal/contact_psn_cname" label="联系人-->姓名" type="text"  class="input_css required"   maxlength="10" value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />"/>
        </td>
        <td align="right" width="145px">手机：</td>
        <td colspan="2">
            <input name="proposal/contact_psn_mobile" label="联系人-->手机" type="text" onfocus="InitInput.setNumber(this,11,0,0)" maxlength="11"  class="input_css required mobile"  value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />"/>
        </td>
    </tr>
    <tr>

        <td align="right">联系电话：</td>
        <td >
            <input name="proposal/contact_psn_tel_work" label="联系人-->联系电话" type="text" required class="input_css required"  maxlength="50" value="<x:out select="$xmlData/data/proposal/contact_psn_tel_work" />"/>
        </td>

        <td align="right">E-mail：</td>
        <td >
            <input name="proposal/contact_psn_email" label="联系人-->E-mail" type="text" required class="input_css required email"   maxlength="100" value="<x:out select="$xmlData/data/proposal/contact_psn_email" />"/>
        </td>

    </tr>
</table>
<div class="t_bar">
   <strong>高级以上职称科技特派员创业导师情况</strong>
</div>
<table  id="prj_teampersons" border="0" cellspacing="0" cellpadding="0" class="table01" label="其他入驻科技特派员情况" >
    <thead>
    <tr>
        <th align="center" width="5%">选择</th>
        <th align="center"  nowrap width="5%">序号</th>
        <th align="center" width="8%">姓名</th>
        <th align="center" width="15%">派出（所在）单位</th>
        <th align="center" width="8%">性别</th>
        <th align="center" width="8%">职务</th>
        <th align="center" width="12%">职称</th>
        <th align="center" width="15%">驻点基地工作起始年月</th>
        <th align="center" width="10%">何时注册为何级（省、市、县）科技特派员</th>
        <%--<th align="center" width="12%">科技特派员认定时间</th>--%>
        <th align="center" width="14%">身份证号码</th>

    </tr>
    </thead>
    <tbody id="tab1">
    <tr style="display:none">
        <td align="center">
            <input type="radio" class="radiobutton" name="selectpersons" >
        </td>
        <td align="center">
            <span style="display: none" name="zh_persons|zh_person[0]@seq_no" >[index]</span>
            <span name="seq_no2" >[index2]</span>
        </td>
        <td align="center"><input name="zh_persons|zh_person[0]|basic_info|zh_name" class="input_text required" label="姓名"  maxlength="30" style="width: 85%;"/></td>

        <td align="center"><input name="zh_persons|zh_person[0]|basic_info|org_name" class="input_text required"
                                  label="派出（所在）单位" maxlength="30" style="width: 85%;"/></td>

        <td>
            <cpt:select id="gender[index]" name="gender" style="width: 50px;" value=""  key="gender" onChange="initControlValue(this.id);"></cpt:select>
            <input type="hidden" id="gender[index]_value" name="zh_persons|zh_person[0]|basic_info|gender_value" value="" class="required" label="性别"/>
            <input type="hidden" id="gender[index]_name" name="zh_persons|zh_person[0]|basic_info|gender_name" value=""/>
        </td>

        <td align="center"><input name="zh_persons|zh_person[0]|basic_info|position" class="input_text required" label="职务"  maxlength="30" style="width: 85%;"/></td>

        <td align="center" nowrap="nowrap">
            <cpt:tree key="prof_title" cacheable="false" className=" hn_iuput_kuang1" readonly="true" value="${prof_title}" label="职称" width="60%"
                      id="prof_title[index]" name="prof_title" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="extendTree"/>
            <input type="hidden" id="prof_title[index]_value" name="zh_persons|zh_person[0]|basic_info|prof_title_value" value="" class="required" label="职称"/>
            <input type="hidden" id="prof_title[index]_name" name="zh_persons|zh_person[0]|basic_info|prof_title_name" value=""/>
        </td>

        <td align="center">

           <%-- <input id="sb_start_date_[0]"
                   name="zh_persons|zh_person[0]|basic_info|sb_start_date" label="驻点基地工作开始时间" value=""
                   class=" required input_text date  dateCompare:sb_end_date_[0] dateCompareAfterE:sb_start_date_[0]:start_date"
                   style="width: 70px"/>--%>

            <cpt:date id="sb_start_date_[index]" name="zh_persons|zh_person[0]|basic_info|sb_start_date"
                      size="12" value="" className="required date" label="驻点基地工作开始时间"></cpt:date>
            <br>至<br>
            <%--<input id="sb_end_date_[0]"
                   name="zh_persons|zh_person[0]|basic_info|sb_end_date" label="驻点基地工作结束时间" value=""
                   class=" required input_text date dateCompareBeforeE:sb_end_date_[0]:end_date "
                   style="width: 70px"/>--%>

           <cpt:date id="sb_end_date_[index]" name="zh_persons|zh_person[0]|basic_info|sb_end_date"
                     size="12" value="" className="required date dateCompareBeforeE:sb_start_date_[index]:sb_end_date_[index]" label="驻点基地工作结束时间"></cpt:date>
        </td>

        <td align="center"><input name="zh_persons|zh_person[0]|basic_info|rank" class="input_text required"
                                  label="何时注册为何级（省、市、县）科技特派员" maxlength="30" style="width: 85%;"/></td>

        <%--<td align="center">

            <input id="hold_date_[0]"
                   name="zh_persons|zh_person[0]|basic_info|hold_date" label="科技特派员认定时间" value=""
                   class=" required input_text date  "
                   style="width: 70px"/>
        </td>--%>

        <td align="center">&nbsp;<input name="zh_persons|zh_person[0]|basic_info|card_code" class="input_text required idCard" label="身份证号码"  maxlength="30" style="width: 80%" /></td>
    </tr>

    <c:set value="1" var="index" scope="page"/>
    <x:forEach select="$xmlData/data/zh_persons/zh_person" var="prj_teamperson" begin="1">
        <c:choose>
            <c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
            <c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
        </c:choose>
        <tr >
            <td align="center">
                <input type="radio" class="radiobutton" name="selectpersons" >
            </td>
            <td align="center">
                <span name="seq_no2">${index}</span>
                <span style="display: none" name="zh_persons/zh_person[${flag}${index}]@seq_no" ><x:out select="$prj_teamperson/@seq_no"/></span>
            </td>
            <td align="center">
                <input name="zh_persons/zh_person[${flag}${index}]/basic_info/zh_name"  class="input_text required" label="姓名"  value="<x:out select="$prj_teamperson/basic_info/zh_name"/>" maxlength="30"  style="width: 85%;"/>
            </td>

            <td align="center">
                <input name="zh_persons/zh_person[${flag}${index}]/basic_info/org_name"  class="input_text required" label="派出（所在）单位"  value="<x:out select="$prj_teamperson/basic_info/org_name"/>" maxlength="30" style="width: 90%"/>
            </td>

            <td>
                <c:set var="gender_value"><x:out select="$prj_teamperson/basic_info/gender_value" /></c:set>
                <cpt:select id="gender${flag}${index}" name="gender" style="width: 50px;" value="${gender_value}"  key="gender" onChange="initControlValue(this.id);"></cpt:select>
                <input type="hidden" id="gender${flag}${index}_value" name="zh_persons/zh_person[${flag}${index}]/basic_info/gender_value" value="${gender_value}" class="required" label="性别"/>
                <input type="hidden" id="gender${flag}${index}_name" name="zh_persons/zh_person[${flag}${index}]/basic_info/gender_name" value="<x:out select="$prj_teamperson/basic_info/gender_name" />"/>
            </td>

            <td align="center">
                <input name="zh_persons/zh_person[${flag}${index}]/basic_info/position"  class="input_text required" label="职务"  value="<x:out select="$prj_teamperson/basic_info/position"/>" maxlength="30"  style="width: 85%;"/>
            </td>


            <td align="center" nowrap="nowrap">
                <c:set var="prof_title">{'id':'<x:out select="$prj_teamperson/prof_title_value" />','name':'<x:out select="$prj_teamperson/basic_info/prof_title_name" />'}</c:set>
                <cpt:tree key="prof_title" cacheable="false" className="hn_iuput_kuang1" readonly="true" value="${prof_title}" label="职称" width="60%"
                          id="prof_title${flag}${index}" name="prof_title" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="extendTree"/>
                <input type="hidden" id="prof_title${flag}${index}_value" name="zh_persons/zh_person[${flag}${index}]/basic_info/prof_title_value" value="<x:out select="$prj_teamperson/basic_info/prof_title_value" />" class="required" label="职称"/>
                <input type="hidden" id="prof_title${flag}${index}_name" name="zh_persons/zh_person[${flag}${index}]/basic_info/prof_title_name" value="<x:out select="$prj_teamperson/basic_info/prof_title_name" />"/>
            </td>

            <td align="center">

                <c:set var="sb_start_date" scope="page">
                    <x:out select="$prj_teamperson/basic_info/sb_start_date" />
                </c:set>
                <%--<input id="sb_start_date_[${flag}${index}]"
                       value="${sb_start_date}" label="驻点基地工作开始时间"
                       name="zh_persons/zh_person[${flag}${index}]/basic_info/sb_start_date"
                       class="required date input_text dateCompare:sb_end_date_[${flag}${index}] dateCompareAfterE:sb_start_date_[${flag}${index}]:start_date"
                       style="width: 70px" />--%>

                <cpt:date id="sb_start_date_${index}" size="12" name="zh_persons/zh_person[${flag}${index}]/basic_info/sb_start_date"
                          value="${sb_start_date}" className="required date" label="驻点基地工作开始时间" ></cpt:date>
            <br>至<br>

                <c:set var="sb_end_date" scope="page">
                    <x:out select="$prj_teamperson/basic_info/sb_end_date" />
                </c:set>
                <%--<input id="sb_end_date_[${flag}${index}]"
                       value="${sb_end_date}" label="驻点基地工作结束时间"
                       name="zh_persons/zh_person[${flag}${index}]/basic_info/sb_end_date"
                       class="required date input_text dateCompareBeforeE:sb_end_date_[${flag}${index}]:end_date"
                       style="width: 70px"  />--%>

                <cpt:date id="sb_end_date_${index}" size="12" name="zh_persons/zh_person[${flag}${index}]/basic_info/sb_end_date"
                          value="${sb_end_date}" className="required date dateCompareBeforeE:sb_start_date_${index}:sb_end_date_${index}" label="驻点基地工作结束时间" ></cpt:date>

            </td>

            <td align="center">
                <input name="zh_persons/zh_person[${flag}${index}]/basic_info/rank"  class="input_text required" label="何时注册为何级（省、市、县）科技特派员"  value="<x:out select="$prj_teamperson/basic_info/rank"/>" maxlength="30" style="width: 90%"/>
            </td>

            <%--<td align="center">

                <c:set var="hold_date" scope="page">
                    <x:out select="$prj_teamperson/basic_info/hold_date" />
                </c:set>
                <input id="hold_date_[${flag}${index}]"
                       value="${hold_date}" label="科技特派员认定时间"
                       name="zh_persons/zh_person[${flag}${index}]/basic_info/hold_date"
                       class="required date input_text  "
                       style="width: 70px"  />
            </td>--%>

            <td align="center">
                <input name="zh_persons/zh_person[${flag}${index}]/basic_info/card_code"  class="input_text required idCard" label="身份证号码"  value="<x:out select="$prj_teamperson/basic_info/card_code"/>" maxlength="30" style="width: 80%" />
            </td>

        </tr>
        <c:set value="${index+1}" var="index" scope="page"/>
    </x:forEach>

   <%-- <script type="text/javascript">
        showAllDateTag("prj_teampersons");
    </script>--%>
    </tbody>
</table>

<br />
<table width="98%" align="center">
    <tr >
        <td>
            <input class="button" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('prj_teampersons',10,'高级以上职称科技特派员创业导师情况最多只能填写10条')){addNewRow2s('prj_teampersons');}try{top.resizeFrame();}catch(e){};">
            <input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev2s('prj_teampersons','selectpersons')">
            <input class="button" name="cmdMoveNext" type=button value="下移" onclick="moveNext2s('prj_teampersons','selectpersons')">
            <input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow2s('prj_teampersons','高级以上职称科技特派员创业导师情况');">
        </td>
    </tr>
</table>


<script type="text/javascript">

    function addNewRow2s(tableId,url,title)
    {
        if(url!=null&&url!=""){
            showThickBox(url,title);

        }//跳转页面
        else
            addNewRowDeal2s($("#"+tableId));
    }

    function addNewRowDeal2s(table)
    {
        var tbid = table.attr("id");
        var maxLinNum=table.find("tr").length-1;//获得行数，减去表头和隐藏行
        var lineNum=""+(maxLinNum+1);
        var lineNum2=parseInt(lineNum)-1;
        var tlineNum = "";
        var addHtml=table.find("tr")[1].innerHTML;//获得隐藏行的html,查找第二行
        addHtml=addHtml.replace(/\[index\]/g,lineNum);
        addHtml=addHtml.replace(/\[index2\]/g,lineNum2);
        lineNum = (parseInt(lineNum, 10)-1).toString();//2011.12.13 行下标比行号小1(隐藏行下标[0]，第一行下标[00])
        if (lineNum.length==1){//如果是个位数，前面补0
            lineNum="0"+lineNum;
        }
        addHtml=addHtml.replace(/\[0\]/g,"["+lineNum+"]");//替换html中行号
        addHtml=addHtml.replace(/\|/g,"/");//替换html中节点/的代替符"|"
        table.append("<tr>"+addHtml+"</tr>");//将html增加到最后
    }

    function deleteSelectedRow2s(tableId,message,nummin,warnMsg,selName){
        if(!selName)selName="";
        var tr=$("#"+tableId+" :radio[name*='"+selName+"']:checked").parents("tr");
        if(nummin==null)
            nummin=0;
        var length=tr.length;
        if(tr.length==0)
            tr=$("#"+tableId+" tr").filter(":last");
        else if(tr.length>1)
            tr=tr.first();

        if(tr.get(0).rowIndex-1==nummin){
            if(!!warnMsg){
                scmWarn(warnMsg);
            }else{
                scmWarn(irisNotes.delWarn1);
            }
            return false;
        }
        if(length==0){

            scmWarn(irisNotes.delWarn2);

            return false;
        }
        if(!confirm(messageTip.deleteTip+message+"？"))
            return false;
        tr.remove();
        refreshRowINdex2s(tableId);
        return true;
    }

    /**
     * 上移行
     * @param tblId
     * @returns {Boolean}
     */
    function movePrev2s(tblId,selName) {

        if (!selName)
            selName = "";
        if ($("#" + tblId + " :radio[name*='" + selName + "']:checked").length == 0) {
            scmWarn(irisNotes.prevWarn);
            return false;
        }
        if ($("#" + tblId + " tr").length <= 2)
            return false;
        var trChecked = $("#" + tblId + " :radio[name*='" + selName + "']:checked")
            .parents("tr").first();// 取得被选中的行
        var trPrev = trChecked.prev();// 取得上一行
        var index = trChecked.get(0).rowIndex;// 获得行号
        if (index <= 2) {// 如果是第一行
            scmWarn(irisNotes.tabelMoveWarn1);
            return false;
        }
        //trChecked.remove();
        trPrev.before(trChecked);
        trChecked.find(":radio[name*='" + selName + "']").attr("checked", 'true');
        refreshRowINdex2s(tblId);
    }

    /**
     * 下移行
     * @param tblId
     * @returns {Boolean}
     */
    function moveNext2s(tblId,selName) {
        if (!selName)
            selName = "";
        if ($("#" + tblId + " :radio[name*='" + selName + "']:checked").length == 0) {
            scmWarn(irisNotes.nextWarn);
            return false;
        }
        if ($("#" + tblId + " tr").length <= 2) {
            return false;
        }
        var trChecked = $("#" + tblId + " :radio[name*='" + selName + "']:checked")
            .parents("tr").first();// 取得被选中的行
        var trNext = trChecked.next();
        var index = trChecked.get(0).rowIndex;// 获得行号
        if (index == $("#" + tblId + " tr").length - 1) {// 如果是第一行
            scmWarn(irisNotes.tabelMoveWarn2);
            return false;
        }
        //trChecked.remove();
        trNext.after(trChecked);
        trChecked.find(":radio[name*='" + selName + "']").attr("checked", "true");
        refreshRowINdex2s(tblId);
    }

    /**
     * 重新计算行号
     * @param tblId
     */
    function refreshRowINdex2s(tblId){
        //重新计算行号


        $("#"+tblId+" tr").each(function(){

                var seq=$(this).get(0).rowIndex;//获得行数
                if(seq>1){//如果有行  显示时display行不计入类，故只减1

                    seq=seq-1;
                    var seq_no=$(this).find("[name$='seq_no']");
                    var seq_no2=$(this).find("[name='seq_no2']");
                    if(seq_no.is("span")){
                        seq_no.html(seq);
                        seq_no2.html(seq);
                    }
                    else{
                        seq_no.val(seq);
                        seq_no2.val(seq);
                    }


                    seq=""+seq;
                    if(seq.length==1)
                        seq="0"+seq;
                    //替换相应的name参数的seq
                    $(this).find("input,span,textarea,select").each(function(){
                        var name=$(this).attr("name");
                        if(name!=null&&name!=""){
                            name=name.replace(/\[\d*\]/g,"["+seq+"]");
                            $(this).attr("name",name);
                        }
                        /*var id=$(this).attr("id");
                        if(id!=null&&id!=""){
                            id=id.replace(/\[\d*\]/g,"["+seq+"]");
                            $(this).attr("id",id);
                            id=id.replace(/\d+/g,""+seq+"");
                            $(this).attr("id",id);
                        }*/
                        var className=$(this).attr("class");
                        if(className!=null&&className!=""){
                            className=className.replace(/\[\d*\]/g,"["+seq+"]");
                            $(this).attr("class",className);
                        }
                    });
                }
            }
        );

    }

    function selectFirstRadio(obj) {
        $(obj).parent('td').parent('tr').find('input[type="radio"]').attr("checked","checked");
        setSubmitPsn();
    }
    function checkSubmitPsn(tableId){
        <security:authorize ifNotGranted="A_DAILU_PROPOSAL">
        var tr=$("#"+tableId+" :radio:checked").parents("tr");
        if(tr.length!=0 && tr.get(0).rowIndex==2){
            scmWarn('如果您需要修改申请人信息， 请保存申请书后点击菜单“管理”>“个人信息维护”完成修改');
            return false;
        }
        </security:authorize>

        return true;

    }
    function psnSynchro(){
        $("span[name$='fzr_psnname']").text($("#zh_persons tr:eq(2)").find("span[name$='basic_info/zh_name']").text());
        $("span[name$='fzr_tel']").text($("#zh_persons tr:eq(2)").find("input[name$='contact/tel_work']").val());
        $("span[name$='fzr_mobile']").text($("#zh_persons tr:eq(2)").find("input[name$='contact/mobile']").val());
        $("span[name$='fzr_mail']").text($("#zh_persons tr:eq(2)").find("input[name$='contact/email']").val());
    }


    /**
     * 选择树设置隐藏域值 public.js中原函数不适用，针对treeId中包含下标的情况
     */
    function initTreeValueExtend(treeId, treeNode) {

        var inputId = treeId;
        if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
            scmWarn($("#" + treeId).attr("label")
                + messageTip.researchAreaInvalidDisciplineCode);
            if (treeNode.level == 0) {
                $("#" + treeId).val("");
                $("#" + treeId).parents("td").find("[name$='" + inputId + "_code'],[id$='" + inputId+ "_code']").val("");
                $("#" + treeId).parents("td").find("[name$='" + inputId + "_value'],[id$='" + inputId+ "_value']").val("");
                $("#" + treeId).parents("td").find("[name$='" + inputId + "_name'],[id$='" + inputId+ "_name']").val("");
            }
            return false;
        }
        var str = treeNode.name;
        var obj = treeNode.parentNode;
        while (obj != null) {
            //str = obj.name + "-" + str;
            obj = obj.parentNode;
        }
        $("#" + treeId).parents("td").find("[name$='" + inputId + "_code'],[id$='" + inputId+ "_code']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + inputId + "_value'],[id$='" + inputId+ "_value']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + inputId + "_name'],[id$='" + inputId+ "_name']").val(str);
    }


    /**
     * 选择树设置隐藏域值 public.js中原函数不适用
     */
    function extendTree(treeId, treeNode) {
        if(treeId == 'belong_industry'){
            if(treeNode.level < 2){
                scmWarn($("#" + treeId).attr("label")
                    + "不能选择第一、二级，请选择它的子级！");
                return false;
            }
        }
        //针对单位性质
        if ((treeId == "nature" && treeNode && treeNode.isParent)) {
            scmWarn("请选择具体的"+$("#" + treeId).attr("label"));
            $("#" + treeId).val("");
            $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
            $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
            $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
            return false;
        }
        if (treeId == "nature" && !confirm("切换单位的注册类型会清空财务、附件等信息，您确定要切换吗？")) {
            return false;
        }
        //if (!(treeNode && treeNode.level > 0)) {
        if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
            scmWarn($("#" + treeId).attr("label")
                + messageTip.researchAreaInvalidDisciplineCode);
            if (treeNode.level == 0) {
                $("#" + treeId).val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
            }
            return false;
        }
        var str = treeNode.name;
        var obj = treeNode.parentNode;
        while (obj != null) {
            //str = obj.name + "-" + str;
            obj = obj.parentNode;
        }
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
    }
    function setPsnNumber(){
        var tbl = document.getElementById("prj_teampersons");

        psnNumber = tbl.rows.length-2+1;
        $("#psn_number").val(psnNumber);
    }
</script>